<?php


namespace Drupal\shusy_store_performance\Entity;


use Entity;

class ShusyStorePerformanceType extends Entity {

  public $type;

  public $label;

  public $weight = 0;

  public $description;

  public function __construct($values = [], $entityType = NULL) {
    parent::__construct($values, 'shusy_store_performance_type');
  }

  public function isLocked() {
    return isset($this->status) && empty($this->is_new) && (($this->status & ENTITY_IN_CODE) || ($this->status & ENTITY_FIXED));
  }


  /**
   * Overrides Entity::save().
   */
  public function save() {
    parent::save();
    field_info_cache_clear();
  }
}
